home *** CD-ROM | disk | FTP | other *** search
- #
- .globl _send
- .globl _receive
- .globl _sendrec
- #ifdef ACK
- .text
- .data
- .bss
- #endif ACK
- | =====================================================================
- | send and receive =
- | =====================================================================
- | send(), receive(), sendrec() destroy d0, d1, and a0.
-
- | See ../h/com.h for C definitions
- SEND = 1
- RECEIVE = 2
- BOTH = 3
-
- .text
- .even
-
- _send: movw #SEND,d0 | send(dest, ptr)
- jra L0
-
- .text
- .even
- _receive:
- movw #RECEIVE,d0 | receive(src, ptr)
- jra L0
-
- .text
- .even
- _sendrec:
- movw #BOTH,d0 | sendrec(srcdest, ptr)
- L0: | d0 = SEND/RECEIVE/BOTH
- #ifdef __GNUC__
- #ifdef __MSHORT__
- movw sp@(4),d1 | d1 = dest-src
- movl sp@(6),a0 | a0 = message pointer
- #else
- movw sp@(6),d1 | d1 = dest-src
- movl sp@(8),a0 | a0 = message pointer
- #endif /* __MSHORT__ */
- #else
- movw sp@(4),d1 | d1 = dest-src
- movl sp@(6),a0 | a0 = message pointer
- #endif
- trap #0 | trap to the kernel
- #ifdef __GNUC__
- #ifndef __MSHORT__
- extl d0 | sign extend for 32bit library
- #endif
- #endif
- rts | return
-